package com.park.controller;

import com.park.common.bean.AreaInputView;
import com.park.common.bean.AreaView;
import com.park.platform.service.IAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Created by Administrator on 2016/1/8.
 */
@Controller
@RequestMapping(value="area")
public class AreaController extends BaseController {

    @Autowired
    private IAreaService areaService;

    @RequestMapping("getAreaListByParentId")
    public void getAreaListByParentId(AreaInputView areaInputView, HttpServletResponse response) {

        List<AreaView> areaViewList = areaService.getAreaListByParentId(areaInputView.getAreaParentId());
        AjaxJsonWriteGson(areaViewList, true, response);

    }

}
